package com.zzy.librarytest.dao;

import com.zzy.librarytest.entity.Record;
import com.zzy.librarytest.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.Date;
import java.util.List;

@Mapper
public interface LendRecordDao {

    @Select("select * from t_lendrecord where id=#{id}")
    Record selectOneRecord(Integer id);

    @Select("select * from t_lendrecord")
    List<Record> selectAllRecord();

    @Insert("insert into t_lendrecord(bookname,lendtime) values(#{bookname},#{lendtime})")
    Integer insertRecord(Record record);

    @Delete("delete from t_lendrecord where id=#{id}")
    Integer deleteRecord(Integer id);

    @Update("update t_lendrecord set lendtime=#{lendtime}  bookname=#{bookname} where id=#{id}")
    Integer updateRecord(Integer id);
}
